#ifndef	__MAX7219_H
#define	__MAX7219_H

#include "config.h"

#define  DECODE_MODE   0x09
#define  INTENSITY     0x0A
#define  SCAN_LIMIT    0x0B
#define  SHUT_DOWN     0x0C
#define  DISPLAY_TEST  0x0F

#define  MySPI_SCL  P10
#define  MySPI_CS   P11
#define  MySPI_SDA  P16
#define  MySPI_LED  P17

#define  Key1  P37
#define  Key2  P36
#define  Key3  P35
#define  Key4  P34

void GPIO_Init(void);
void Key_Init(void);
void LED_Init(void);

unsigned char KeyNum(void);
void MAX7019_Init(void);
void Max7219_Wbyte(unsigned char temp);
void Max7219_WCmd(unsigned char Cmd,unsigned char DATA);
void MAX7019_Col(void);

unsigned char KeyNum(void);

#endif
